<template>
<a-config-provider :locale="locale">
  <div id="app">
    <router-view />
  </div>
</a-config-provider>
</template>

<script>
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
export default {
  data() {
    return {
      locale: zhCN
    };
  },
  mounted: function() {
    //此方法刷新页面时也会执行
    //  window.addEventListener('beforeunload',()=>{
    //     localStorage.removeItem('token');
    // });
    //  window.onbeforeunload = function (e) {
    //         var storage = window.localStorage;
    //         storage.clear()
    //     }
  }
};
</script>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
#app {
  height: 100vh;
}
</style>
